{template 'admin','header'}
    <form action="{$self_dir}/option.php?action=search" name="form"  onsubmit="return r_submit(this);">
    <input type="hidden" name="site_id" value="{$site_id}"/>
    <table cellpadding="0" cellspacing="1" class="table_list">
        <caption>选项查询</caption>
        <tr>
            <td  class="align_c">
                选项名称：<input type="text" size="30" name="optionname" value="{$optionname}"/>
                <input type="submit" class="button_style" value="查询"/>
            </td>
        </tr>
    </table>
    </form>
    <form action="{$self_dir}/option.php?action=listorder" name="form1"  method="POST" onsubmit="return r_submit(this);">
    <input type="hidden" name="site_id" value="{$site_id}"/>
        <table cellpadding="0" cellspacing="1" class="table_list">
        <caption>选项管理</caption>
        <tr>
            <th width="80" class="align_c"><input type="checkbox" onclick="checkall(this,'oid')" id="chkall">全选/取消</th>
            <th width="5%">排序</th>
            <th width="5%">ID</th>
            <th>问卷名称</th>
            <th>试题名称</th>
            <th>选项名称</th>
            <th>添加时间</th>
            <th width="320">管理操作</th>
        </tr>
        {loop $option_list $option}
        <tr>
            <td class="align_c">
                <input id="oid" name="oid[]" type="checkbox" id="checkbox"  value="{$option['id']}"/>
            </td>
            <td class="align_c">
                <input type="text" name="listorder[{$option['id']}]" size="2" value="{$option['listorder']}"/>
            </td>
            <td class="align_c">{$option['id']}</td>
            <td class="align_c">{$investigate_list[$option['investigateid']]}</td>
            <td class="align_c">{$questions_list[$option['questionsid']]}</td>
            <td class="align_c">{$option['optionname']}</td>
            <td class="align_c">{date('Y-m-d',$option['inputtime'])}</td>
            <td class="align_c">
                {if check_perms('option003')===true}<a href="{$self_dir}/option.php?action=edit&site_id={$site_id}&id={$option['id']}&forward={$forward}">修改</a>&nbsp;|&nbsp;{/if}
                {if check_perms('option004')===true}<a href="javascript:my_request('{format_url("$self_dir/option.php?action=del&id=".$option['id'])}','确认要删除吗？')">删除</a>{/if}
            </td>
        </tr>
        {/loop}
    </table>
    <div class="button_box">
        {if check_perms('option005')===true}<input class="button_style" name="order" type="button" value=" 排序 " onclick="change_opt('form1','{$self_dir}/option.php?action=listorder&forward={$forward}')"/>{/if}
        {if check_perms('option004')===true}<input class="button_style" name="del" type="button" value=" 批量删除 " onclick="change_opt('form1','{$self_dir}/option.php?action=del_all')"/>{/if}
        <input type="button" class="button_style" onclick="self.location='{$parent_forward}'" value=" 返回 ">
    </div>
    </form>
    <div id="pages">
        {$option_pages}
    </div>
{template 'admin','footer'}
